﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ClassProject.Entity;
using Microsoft.ApplicationBlocks.Data;

namespace ClassProject.DAL
{
    class BannerDAL:ADONET
    {
        private BannerEntity en = new BannerEntity();

        public BannerDAL()
        {

             
        }

        public int Insert()
        {          
            int i = SqlHelper.ExecuteNonQuery(this._strCon,"sp_Insert_Banner", en.BannerID, en.Name, en.Image);
            return i;
        }

        public int Update()
        {
            int i = SqlHelper.ExecuteNonQuery(this._strCon, "sp_Update_Banner", en.BannerID, en.Name, en.Image);
            return i;          
        }

        public int Delete()
        {
            int i = SqlHelper.ExecuteNonQuery(this._strCon, "sp_Delete_Banner", en.BannerID);
            return i;
        }
    }
}
